Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file offsets in traces if object has no symbols #513

Merged
merged 1 commit into from
Jan 8, 2020
Merged

Use file offsets in traces if object has no symbols #513

merged 1 commit into from
Jan 8, 2020

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jan 7, 2020

Use file offsets in traces if object has no symbols

Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.

This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.

Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.

Closes: #514

@shinh
Copy link
Collaborator

shinh commented Jan 8, 2020

Seems reasonable! Is there any reason someone want to turn off this feature? I'm not sure if we need SYMBOLIZE_FALLBACK.

@mspang
Copy link
Contributor Author

mspang commented Jan 8, 2020

Seems reasonable! Is there any reason someone want to turn off this feature? I'm not sure if we need SYMBOLIZE_FALLBACK.

I agree it's probably unnecessary; removed. Only added that in case someone is depending on the return value for something as we're unlikely to ever return "false" after this change. Personally I think
that is a feature :)

Fallback to using file offsets if no symbol is found, like we do if the
object could not be opened.

This makes backtraces usable even if objects in the trace are stripped,
since the trace can be symbolized by post-processing it with a tool like
asan_symbolize.py.

Note that this is not currently compatible with SymbolizeCallback as
this overwrites the filename in the buffer. The behavior is unchanged
in that case.

Closes: #514
@ukai ukai added the LGTM label Jan 8, 2020
@ukai ukai merged commit 130a3e1 into google:master Jan 8, 2020
@mspang mspang deleted the symbolize-stripped-binaries branch January 11, 2020 19:52
@sergiud sergiud added this to the 0.5 milestone Mar 30, 2021
@sergiud sergiud mentioned this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stripped binaries produce useless backtraces
5 participants